package com.xinqi.modules.sys.platform.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.platform.domain.PlatformEntity;
import com.xinqi.modules.sys.platform.dto.req.PlatformCreateDTO;
import com.xinqi.modules.sys.platform.dto.req.PlatformUpdateDTO;
import com.xinqi.modules.sys.platform.dto.rsp.PlatformResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 系统平台转换
 *
 * @author: linkai
 * @date: 2023/04/01
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class PlatformConvert {
    public abstract PlatformEntity create(PlatformCreateDTO s);

    public abstract PlatformEntity update(PlatformUpdateDTO s, @MappingTarget PlatformEntity t);

    public abstract PlatformEntity update(PlatformUpdateDTO s);

    public abstract PlatformResultDTO convert(PlatformEntity s);
}
